package com.minke.springboot.controller;

import com.minke.springboot.entity.School;
import com.minke.springboot.mapper.SchoolMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 何杨谊
 * @description: TODO
 * @date 2022/3/31 16:20
 */
@RestController
@RequestMapping("api/school")
public class SchoolController {
    @Autowired
    private SchoolMapper schoolMapper;

    @GetMapping("/{id}")
    public School query(@PathVariable int id){
        return schoolMapper.selectByPrimaryKey(id);
    }
}
